Major depressive disorder (MDD) is common and imposes a very high societal burden in terms of cost, morbidity, suffering, and mortality. While primary care is the de facto site for treatment of MDD, outcomes in primary care are poor. Two principal reasons for the poor outcomes in primary care are poor patient adherence to antidepressant medications (ADMs) and the failure of physicians to provide guideline-congruent care. This problem is aggravated by a lack of communication between patients and the care team. A growing body of research indicates that primary care-centered strategies aimed at enhancing guideline-congruent care have not been effective. Interventions aimed at improving adherence in the patient have been successful in changing patient adherence behavior; however these frequently fail to improve depression outcomes, particularly when there is no intervention on the physician side to encourage optimization of ADMs. The most effective strategies address both provider and patient behaviors, usually through the use of a case-manager who monitors and supports patient adherence and response to treatment, and provides actionable feedback to the PCP. However, case-managers have not been widely implemented in primary care settings. Recent developments in information and communications technologies (ICT) have opened new opportunities to improve health and mental health care, and to link patients and their providers. Our proposal harnesses these advances to develop and pilot the medLink system. ADM adherence will be passively measured using an electronic pill dispenser, which is connected to a mobile smartphone via Global System for Mobile Communications (GSM), so that targeted, timely reminders can be provided when the patient fails to take the ADM. When the patient is adherent, the patient will not be bothered with reminders. Depressive symptoms and side-effects will be periodically monitored weekly via the phone. Every 4 weeks, or if indicated (e.g intolerable side effects or urgent situations), primary care teams will receive notifications via the electronic medical record that include a summary of patient data on treatment response and side effects, guideline- congruent treatment recommendations based on patient data and a recommendation to contact the patient, if indicated. Simultaneously, a similar message will be provided to the patient via short message service (or text), including feedback, possible treatment options, and a recommendation to contact the physician's office. Thus, both the patient and care team will be activated to provide, request and adhere to guideline-congruent care. The aim of this proposal is to develop and pilot the medLink system. Development will employ an iterative user-centered approach. The pilot trial will compare 12 weeks of the medLink system to a treatment as usual control among primary care patients with MDD initiating ADM treatment. Outcomes will include patient adherence to ADM, physician adherence to treatment guidelines, and depression.